<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>魔方顶面</title>
<style>
	*{margin:0;padding:0;#}
	video{visibility:hidden;}
	img{visibility:hidden;}
</style>
</head>
<script src="node.js"></script>
<script>
	window.onload=function(){
		
		var canvas=document.getElementById('canvas');
		var hua=canvas.getContext('2d')
		var img=document.getElementById('img');
		hua.fillStyle='#ccc';
		hua.fillRect(0,0,1200,1200)
		hua.beginPath();
		var timer=setInterval(function(){
			mofang(2,100,300,300)
			},50)
			
		var nodeLeft=zuobiaoLeft(2,100,300,400)
		document.onclick=function(eve){
			var e=eve||window.event;
			var offx=e.offsetX;
			var offy=e.offsetY;
			for(var i=1;i<=3;i++){
				for(var j=1;j<=3;j++){
					if(nodeLeft[i][j].centerx-30<=offx&&nodeLeft[i][j].centerx+30>=offx&&nodeLeft[i][j].centery-30<=offy&&nodeLeft[i][j].centery+30>=offy)
					{
						
						//mv1.pause();
						//clearInterval(timer)
						hua.beginPath();
						hua.drawImage(img,nodeLeft[i][j].x,nodeLeft[i][j].y,400,400)
						hua.closePath();
					
						}
					}
				}
			}
		
		}
		
		
</script>
<body>
<canvas id="canvas" width="1200" height='1200'></canvas>
<img src="img/img.gif" width="70" height='270' id="img"/>
<img src="img/imgtop.gif" width="270" height='70' id="img2"/>
<video src="love u u.mp4" id="mv1" width="200"></video>
<video src="演员.mp4" id="mv2" width="200"></video>
</body>
</html>
